package software.lib.dao.impl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import software.lib.dao.RecordDao;

/**
 * Created by Wang on 2017/5/3.
 */
@Transactional
@Repository
public class RecordDaoImpl extends HibernateDaoSupport implements RecordDao {
    @Override
    public Session getSession() {
        return super.currentSession();
    }

    @Autowired
    public void setSessionFactoryOverride(SessionFactory sessionFactory){
        super.setSessionFactory(sessionFactory);
    }
}
